Remove MENU from ResourceMethod in auth manager#52731
Merged
vincbeck merged 1 commit intoapache:mainfrom Jul 7, 2025
Merged
Conversation
1dc085b to
f89f66f
Compare
fab92a2 to
f9c31cb
Compare
f9c31cb to
b08d829
Compare
o-nikolas
approved these changes
Jul 4, 2025
17 tasks
HsiuChuanHsu
pushed a commit
to HsiuChuanHsu/airflow
that referenced
this pull request
Jul 10, 2025
stephen-bracken
pushed a commit
to stephen-bracken/airflow
that referenced
this pull request
Jul 15, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related #51971.
ResourceMethodin auth manager define the list of methods/actions a user can do against a resource. The methodMENUis a special one and only associated to menu items. Removing it from the list remove this confusion.I create
ExtendedResourceMethodto include the methodMENU. This type is only used when the methodMENUis also expected.The benefit of doing so is you should no longer be able to call
auth_manager.is_authorized_configuration(method="MENU"). This does not makes sense since there is a special method in auth manager to filter menu items based on user permissions:filter_authorized_menu_items.^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named
{pr_number}.significant.rstor{issue_number}.significant.rst, in airflow-core/newsfragments.